home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 20 code / Scripting the Finder / Finder Snapshot / Finder Snapshot README < prev    next >
Encoding:
Text File  |  1994-10-13  |  2.5 KB  |  77 lines  |  [TEXT/MMCC]

  1. Greg Anderson
  2. Final rev: October 1994
  3.  
  4.  
  5. About the program "Finder Snapshot"
  6. -----------------------------------
  7. "Finder Snapshot" is a program that remembers the set of open
  8. Finder windows and their positions, and saves that information
  9. in a "Window Set" document.  Whenever the window set document
  10. is opened, "Finder Snapshot" reads the saved information and
  11. reopens and repositions all of the windows that were saved when
  12. the document was created.
  13.  
  14. Some people find that this sample is actually useful.  Imagine
  15. that!
  16.  
  17.  
  18. How the Source is organized
  19. ---------------------------
  20. "Finder Snapshot" consists of a number of source files, some of
  21. which stand on their own, and some of which require support from
  22. other files in the project.  It uses the same mini application
  23. framework that I used in Zawphing and some other sample apps I've
  24. written, but it's a bit stripped down, since it doesn't have
  25. any windows or any real event loop.
  26.  
  27.  
  28. The main files that define the application "Finder Snapshot" are:
  29.  
  30. Main.cp                    Initializes the Macintosh toolbox and
  31.                         begins execution of the application.
  32.  
  33. SaveWindows.cp            The code that actually sends AppleEvents
  34.                         to the Scriptable Finder.  This file handles
  35.                         restoring window positions too.
  36.  
  37.  
  38. The "Mini-application framework" is defined by the following
  39. sources:
  40.  
  41.  
  42. EventHandler.cp            Calls WaitNextEvent and dispatches events
  43.                         to the appropriate handlers.
  44.  
  45.  
  46. The primary utilities of note are:
  47.  
  48. AppleEventUtilities.cp    A stand-alone set of C++ wrappers for
  49.                         the AppleEvent manager.  Includes useful
  50.                         classes for accessing parameters in
  51.                         records, iterating items in lists, and
  52.                         building descriptors, lists and records.
  53.  
  54. Exceptions.cp            Very useful code that implements a failure
  55.                         handler with Try/Catch semantics.  (No dependancies)
  56.  
  57. NextEvent.cp            Old code that used to abstract WaitNextEvent
  58.                         vs. GetNextEvent for running on System 6 without
  59.                         MultiFinder (yes, very old code!).  Had some
  60.                         problems with native code, so now it just calls
  61.                         WaitNextEvent directly, and therefore is of
  62.                         marginal value.
  63.                         Uses MacUtilities.cp.
  64.  
  65. MacUtilities.cp            Simple, useful routines that many Macintosh
  66.                         applications will use.  (No dependancies)
  67.  
  68. StringUtilities.cp        Simple code that manages C and Pascal strings.
  69.                         Not as useful as a real string class, but better
  70.                         than nothing.  (No dependancies)
  71.  
  72.  
  73. And, a header not yet in the standard set but used by Finder Snapshot:
  74.  
  75. FinderRegistry.h        Defines classes, properties, data types and
  76.                         error codes used by the Scriptable Finder.
  77.